<?php
declare(strict_types=1);

namespace Zyucv7\Core\Error;

/**
 * @description 错误处理日志输出
 * @package Zyucv7\Core\Error
 */
class Log
{
    public static function out($data)
    {
        $out_str = [];
        foreach($data as $key => $value) {
            $out_str[] = "{$key}: {$value}";
        }

        return implode(V7_EOL, $out_str);
    }

    public static function error($data)
    {

        $out = self::out($data);
        echo $out;
    }

    public static function exception($data)
    {
        $out = self::out($data);
        echo $out;
    }
}
?>